package com.uzipi.eurekaclient.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.client.discovery.DiscoveryClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>name：DcController </p>
 * <p>description: DiscoveryClient Controller </p>
 *
 * @author uzipi
 * @version v1.0
 * @since
 */

@RestController
public class DcController {

    @Autowired
    DiscoveryClient discoveryClient;

    @GetMapping("/dc")
    public String dc() {
        String services = "我是服务提供者 Services:" + discoveryClient.getServices();
        System.out.println(services);
        return services;
    }

}
